from alipay import AliPay
from . import settings

alipay = AliPay(
    appid=settings.APPID,
    app_notify_url=settings.APP_NOTIFY_URL,  # 默认回调url
    app_private_key_string=settings.APP_PRIVATE_KEY_STRING,
    # 支付宝的公钥，验证支付宝回传消息使用，不是你自己的公钥,
    alipay_public_key_string=settings.ALIPAY_PUBLIC_KEY_STRING,
    sign_type=settings.SIGN_TYPE,  # rsa2 或者 RSA2
    debug=settings.DEBUG  # 默认False
)

alipay_gateway = settings.ALIPAY_GATEWAY